function setAri(){
    var content = document.querySelector("#agrInfo"),
		contentHtml = "<div id=\"agrProductinfo\" style=\"width: 100%; height: 300px; overflow: auto;\">";
	var url = "http://118.25.235.213:8030/wp/";		
		$.ajax({
				url: url + "CompanyInfoController/allProduct.do",
				type: "get",
				dataType: "json",
				async: false,
				success:function(result){
					if(result.siteInfo.length > 0){
						result = result.siteInfo;	
						for(i=0; i<result.length; i++){
							product = result[i].productList;
							for(c=0; c<2; c++){
								contentHtml += "<div class=\"ariDiv\" onclick=\"openWins('"+ product[c].userId +"', '"+ product[c].siteColumnId +"')\">" +											   								
										   "<img class=\"ariImg\" src=\""+ url + product[c].imgPath + "\" title=\""+ product[c].productName +"\"/>" +										   
										   "<div class=\"ariPrice\">¥ "+ product[c].price +"</div>"+
										   "<div class=\"ariTitle\" title=\""+ product[c].productName +"\">"+ product[c].productName +"</div>"+
										   "<div class=\"ariDes\" style=\"font-size: 13px\" title=\""+ product[c].prodoctDescription +"\">"+" " + product[c].prodoctDescription +"</div>"+	
										   "<div style=\"float: left; width: 100%;\">" +																					
											 "<p class=\"ariAdres\">"+ result[i].name +"</p>" +
										   "</div>" +										
										"</div>";
							}								
						}
						contentHtml += "</div>";
						content.innerHTML = contentHtml;
					}
				},
				error:function(){
					window.console.log("请求数据异常");//异常处理
				}						
		});	
}
setAri();

function openWins(id, productId){
	href="http://118.25.235.213:8030/rfpf/#/mains/"+id +"?siteId=" + productId;
    window.open(this.href, '_blank');
}